<?php
include 'conn.php';

if($_POST['url']=="getSelectNum"){
    $sql="SELECT * FROM typetable";
    $result=$conn->query($sql);
    $css=$result->fetch_all();
//$jarr=array();
//while($rows=mysqli_fetch_array($result,MYSQLI_ASSOC))
//{
//    $count=count($rows);
//    for($i=0;$i<$count;$i++)
//    {
//        unset($rows[$i]);
//    }
//    array_push($jarr,$rows);
//}
//$jobj=new stdClass();
//foreach ($jarr as $key=>$value)
//{
//    $jobj->$key=$value;
//}
    echo json_encode($css);
}
elseif($_POST['url']=="getTheStore")
{
    $sql='SELECT COUNT(*),MAX(targetInfo.number) FROM targetInfo';
    $result=$conn->query($sql);
    list($css)=$result->fetch_all();
    $sql2='SELECT COUNT(*) FROM targetInfo WHERE isDel=0';
    $result2=$conn->query($sql2);

    //print_r($result2);exit();
    list($css2)=$result2->fetch_all();
    $arr=array_merge($css,$css2);

    echo json_encode($arr);
    $conn->close();
}






























